/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.inventory.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 资产管理Entity
 * @author johnKee
 * @version 2016-07-20
 */
public class ZlmtCabinet extends DataEntity<ZlmtCabinet> {
	
	private static final long serialVersionUID = 1L;
	private String cabinetCode;		// 机柜编号
	private Long row;		// 第几排
	private Long columns;		// 第几列
	private Long volume;		// 容量(U)

	private  String label;
	
	public ZlmtCabinet() {
		super();
	}

	public ZlmtCabinet(String id){
		super(id);
	}

	@Length(min=0, max=128, message="机柜编号长度必须介于 0 和 128 之间")
	public String getCabinetCode() {
		return cabinetCode;
	}

	public void setCabinetCode(String cabinetCode) {
		this.cabinetCode = cabinetCode;
	}
	
	public Long getRow() {
		return row;
	}

	public void setRow(Long row) {
		this.row = row;
	}
	
	public Long getColumns() {
		return columns;
	}

	public void setColumns(Long columns) {
		this.columns = columns;
	}
	
	public Long getVolume() {
		return volume;
	}

	public void setVolume(Long volume) {
		this.volume = volume;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getLabel(){
		return "第"+row+"排，第"+columns+"列，编号["+cabinetCode+"]的机柜";
	}

}